package com.example.Lezedata.ui.fragment;



import android.content.Context;
import android.os.Bundle;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.example.Lezedata.ui.activity.baseClass.GBBaseVc;
import com.example.Lezedata.util.CGHUDView;

public class BaseFragment extends Fragment {
    public String TAG;
    public View contentView;
    @Override
    public void onAttach(@NonNull Context context) {
        super.onAttach(context);
        TAG = getClass().getName();
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        contentView = view;
        initView();
    }

    public GBBaseVc baseVc(){
        return (GBBaseVc)this.getActivity();
    }

    public final <T extends View> T findViewById(int id){
        return contentView.findViewById(id);
    }

    public final <T extends View> T findViewWithTag(Object object){
        return contentView.findViewWithTag(object);
    }

    public void initView(){}

    public void hudShow(){
        baseVc().hudShow();
    }

    public void hudDismiss(){
        baseVc().hudDismiss();
    }
}
